package cc.wanforme.st.server.base.service;

import org.springframework.lang.Nullable;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;

import cc.wanforme.st.server.authen.dto.AdminRoleAuth;
import cc.wanforme.st.server.base.entity.Admin;

/**
 * <p>
 * 用户表服务类
 * </p>
 *
 * @author wanne
 * @since 2020-09-18
 */
public interface IAdminService extends IService<Admin> {

	/** 用户名查询*/
	Admin selectByUsername(String username);
	
	AdminRoleAuth selectAuthenticationsByAdmin(long adminId) ;
	
	Admin selectAdminByToken(String token);
	
	AdminRoleAuth selectAuthenticationsByToken(String token);
	
	Admin saveVo(Admin vo);
	
	void updateVo(Admin vo);
	
	void deleteAdmin(String id);
	
	void resetPassword(String userId, String password);
	
	PageInfo<Admin> searchAdmins(int page, int pageSize, 
			@Nullable String name, @Nullable String username);

	void resetPwd(Long id, String password);
	
}
